#include <bits/stdc++.h>
using namespace std;
#define int long long
int ans,a[1000100],n;
bool flag[1000100];
int find(int x){
    for(int i=1;i<=n;i++){
        if(a[i]>x&&flag[i]==0)return i;
    }
    return 0;
}
signed main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    cin >> n;
    for(int i=1;i<=n;i++)cin >> a[i];
    sort(a+1,a+n+1);
    for(int i=1;i<=n;i++){
        int t=find(a[i]);
        if(t==0)break;
        else {
            a[i]=-1;
            flag[t]=1;
        }
    }
    for(int i=1;i<=n;i++){
        if(a[i]!=-1)ans++;
    }
    cout << ans;
    return 0;
}
